<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<div class="t_bar">
	<span class="color_red">*</span>项目投入经费（单位：万元）
</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1"  id="budgetsMsg">
	<tr>
		<td  nowrap align="right">项目计划投入总额：</td>
		<td ><input type="text" style="text-align: right;width: 100px"
			name="budgets/input_total" id="source_total"
			class=" valueGreatEqual:source_total:source_already" 
			label="项目计划投入总额" 
			value="<x:out select="$xmlData/data/budgets/input_total" />"
			onchange="synchro();"
			onfocus="InitInput.setNumber(this,9,4,2)" /></td>
		<td  nowrap align="right">上年度已完成投资：</td>
		<td><input type="text" style="text-align: right;width: 100px"
			name="budgets/already_input_total" id="source_already"
			class="required gray valueEqual:source_already:total_total_0" label="上年度已完成投资" disabled
			value="<x:out select="$xmlData/data/budgets/already_input_total" />"
			onfocus="InitInput.setNumber(this,9,4,2)" /></td>
		<td align="right"><span class="color_red">*</span>申请金额：</td>
		<td ><input type="text"
			style="text-align: right;width: 100px" name="budgets/apply_money"
			id="source_apply"
			class="required " label="申请金额"
			onchange="synchro();"
			value="<x:out select="$xmlData/data/budgets/apply_money" />"
			onfocus="InitInput.setNumber(this,9,4,2)" /></td>



	</tr>
</table>
<br/>
<div class="t_bar">
	<span class="color_red">*</span>上年度已完成投资来源（单位：万元）
</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1"  id="budgetsMsg1">
	<tr align="center" class="li_2">
		<td rowspan="2">自有资金</td>
		<td rowspan="2">银行贷款</td>
		<td colspan="4">已获政府资助</td>
		<td rowspan="2" >其他资金</td>
	</tr>
	<tr align="center" class="li_2">
		<td>国家</td>
		<td>省级</td>
		<td>市级</td>
		<td>区级</td>
	</tr>
	<tr class="li_1">
		<td><input type="text" style="text-align: right; width: 100px"
			name="budgets/own_fund_over" id="source_own_over"
			onchange="countFundAuto('source_','own_over,bank_over,other_over,country_over,provincial_over,city_over,area_over','already');synchro();"
			class="required" label="上年度已完成投资来源-->自有资金"
			value="<x:out select="$xmlData/data/budgets/own_fund_over" />"
			onfocus="InitInput.setNumber(this,9,4,2)" /></td>

		<td><input type="text" style="text-align: right; width: 100px"
			name="budgets/bank_fund_over" id="source_bank_over"
			onchange="countFundAuto('source_','own_over,bank_over,other_over,country_over,provincial_over,city_over,area_over','already');synchro();"
			class="required" label="上年度已完成投资来源-->银行贷款"
			value="<x:out select="$xmlData/data/budgets/bank_fund_over" />"
			onfocus="InitInput.setNumber(this,9,4,2)" /></td>

	

		<td><input type="text" style="text-align: right; width: 100px"
			name="budgets/country_fund_over" id="source_country_over"
			onchange="countFundAuto('source_','own_over,bank_over,other_over,country_over,provincial_over,city_over,area_over','already');synchro();"
			class="required" label="上年度已完成投资来源-->已获政府资助（国家）"
			value="<x:out select="$xmlData/data/budgets/country_fund_over" />"
			onfocus="InitInput.setNumber(this,9,4,2)" /></td>

		<td><input type="text" style="text-align: right; width: 100px"
			name="budgets/provincial_fund_over" id="source_provincial_over"
			onchange="countFundAuto('source_','own_over,bank_over,other_over,country_over,provincial_over,city_over,area_over','already');synchro();"
			class="required" label="上年度已完成投资来源-->已获政府资助（省级）"
			value="<x:out select="$xmlData/data/budgets/provincial_fund_over" />"
			onfocus="InitInput.setNumber(this,9,4,2)" /></td>

		<td><input type="text" style="text-align: right; width: 100px"
			name="budgets/city_fund_over" id="source_city_over"
			onchange="countFundAuto('source_','own_over,bank_over,other_over,country_over,provincial_over,city_over,area_over','already');synchro();"
			class="required " label="上年度已完成投资来源-->已获政府资助（市级）"
			value="<x:out select="$xmlData/data/budgets/city_fund_over" />"
			onfocus="InitInput.setNumber(this,9,4,2)" /></td>
		<td><input type="text" style="text-align: right; width: 100px"
			name="budgets/area_fund_over" id="source_area_over"
			onchange="countFundAuto('source_','own_over,bank_over,other_over,country_over,provincial_over,city_over,area_over','already');synchro();"
			class="required" label="上年度已完成投资来源-->已获政府资助（区级）"
			value="<x:out select="$xmlData/data/budgets/area_fund_over" />"
			onfocus="InitInput.setNumber(this,9,4,2)" /></td>
		
	<td><input type="text" style="text-align: right; width: 100px"
			name="budgets/other_fund_over" id="source_other_over"
			onchange="countFundAuto('source_','own_over,bank_over,other_over,country_over,provincial_over,city_over,area_over','already');synchro();"
			class="required " label="上年度已完成投资来源-->其他资金"
			value="<x:out select="$xmlData/data/budgets/other_fund_over" />"
			onfocus="InitInput.setNumber(this,9,4,2)" /></td>	
			
	</tr>

</table>

<br/>
<div class="t_bar">
	<span class="color_red">*</span>上年度已完成投资支出（单位：万元）
</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1" id="fundAdds">

	<tr >
		<td class="TblHead" align="center"  width="20%">支出科目</td>
		<td class="TblHead" align="center" width="20%">金额</td>
		<td class="TblHead" align="center" width="60%" >用途说明</td>
	</tr>
	
	<tr>
		<td align="center" >合计</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[00]@invest_code" value="00" /> <input
			type="hidden" name="budget/invest_detail/invest[00]/name" value="合计" />
			<input type="text" name="budget/invest_detail/invest[00]/total_total"
			id="total_total_0" class="gray" disabled label="上年度已完成投资支出合计"
			style="text-align: right; width: 100px;"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='00']/total_total" />" />
		</td>
		<td>&nbsp;</td>
	</tr>

	<tr>
		<td align="left" >1、设备费</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[01]@invest_code" value="01" /> <input
			type="hidden" name="budget/invest_detail/invest[01]/name"
			value="1、设备费" /> <input type="text"
			style="text-align: right; width: 100px" class="gray" disabled
			name="budget/invest_detail/invest[01]/total_total" id="total_total_1"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='01']/total_total" />"
			onfocus="InitInput.setNumber(this,9,4,2)" /></td>
		<td><span name="budget/invest_detail/invest[01]/user_desc">按附表1列示</span></td>
		
	</tr>
	<tr>
		<td align="left" >（1）购置设备费</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[02]@invest_code" value="02" /> <input
			type="hidden" name="budget/invest_detail/invest[02]/name"
			value="2、购置设备费" /> <input type="text"
			style="text-align: right; width: 100px"
			name="budget/invest_detail/invest[02]/total_total" id="total_total_2"
			onchange="countFundAuto('total_','total_2,total_3,total_4','total_1');countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='02']/total_total" />"
			onfocus="InitInput.setNumber(this,9,4,2)" /></td>
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[02]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='02']/user_desc" />"/></td>
		
	</tr>
	<tr>
		<td align="left" >（2）自制设备费</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[03]@invest_code" value="03">
			<input type="hidden" name="budget/invest_detail/invest[03]/name"
			value="自制设备费"> <input type="text"
			name="budget/invest_detail/invest[03]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_3"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_2,total_3,total_4','total_1');countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='03']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[03]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='03']/user_desc" />"/></td>
	</tr>
	<tr>
		<td align="left" >（3）设备改造与租赁</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[04]@invest_code" value="04">
			<input type="hidden" name="budget/invest_detail/invest[04]/name"
			value="设备改造与租赁"> <input type="text"
			name="budget/invest_detail/invest[04]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_4"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_2,total_3,total_4','total_1');countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='04']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[04]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='04']/user_desc" />"/></td>
	</tr>
	<tr>
		<td align="left" >2、基本建设费</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[05]@invest_code" value="05">
			<input type="hidden" name="budget/invest_detail/invest[05]/name"
			value="基本建设费"> <input type="text"
			name="budget/invest_detail/invest[05]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_5"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='05']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[05]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='05']/user_desc" />"/></td>
	</tr>
	<tr>
		<td align="left" >3、材料费</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[06]@invest_code" value="06">
			<input type="hidden" name="budget/invest_detail/invest[06]/name"
			value="材料费"> <input type="text"
			name="budget/invest_detail/invest[06]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_6"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='06']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[06]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='06']/user_desc" />"/></td>
	</tr>
	<tr>
		<td align="left" >4、测试化验加工费</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[07]@invest_code" value="07">
			<input type="hidden" name="budget/invest_detail/invest[07]/name"
			value="测试化验加工费"> <input type="text"
			name="budget/invest_detail/invest[07]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_7"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='07']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[07]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='07']/user_desc" />"/></td>
	</tr>
	<tr>
		<td align="left" >5、燃料动力费</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[08]@invest_code" value="08">
			<input type="hidden" name="budget/invest_detail/invest[08]/name"
			value="燃料动力费"> <input type="text"
			name="budget/invest_detail/invest[08]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_8"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='08']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[08]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='08']/user_desc" />"/></td>
	</tr>
	<tr>
		<td align="left" >6、差旅费</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[09]@invest_code" value="09">
			<input type="hidden" name="budget/invest_detail/invest[09]/name"
			value="差旅费"> <input type="text"
			name="budget/invest_detail/invest[09]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_9"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='09']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[09]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='09']/user_desc" />"/></td>
	</tr>
	<tr>
		<td align="left" >7、会议费</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[10]@invest_code" value="10">
			<input type="hidden" name="budget/invest_detail/invest[10]/name"
			value="会议费"> <input type="text"
			name="budget/invest_detail/invest[10]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_10"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='10']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[10]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='10']/user_desc" />"/></td>
	</tr>
	<tr>
		<td align="left" >8、技术合作与交流费</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[11]@invest_code" value="11">
			<input type="hidden" name="budget/invest_detail/invest[11]/name"
			value="技术合作与交流费"> <input type="text"
			name="budget/invest_detail/invest[11]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_11"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='11']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[11]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='11']/user_desc" />"/></td>
	</tr>
	<tr>
		<td align="left" >9、出版费/文献/知识产权事务费</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[12]@invest_code" value="12">
			<input type="hidden" name="budget/invest_detail/invest[12]/name"
			value="出版费/文献/知识产权事务费"> <input type="text"
			name="budget/invest_detail/invest[12]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_12"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='12']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[12]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='12']/user_desc" />"/></td>
	</tr>
	<tr>
		<td align="left" >10、人员费用</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[13]@invest_code" value="13">
			<input type="hidden" name="budget/invest_detail/invest[13]/name"
			value="人员费用"> <input type="text"
			name="budget/invest_detail/invest[13]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_13"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='13']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[13]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='13']/user_desc" />"/></td>
	</tr>
	<tr>
		<td align="left" >11、管理费用</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[14]@invest_code" value="14">
			<input type="hidden" name="budget/invest_detail/invest[14]/name"
			value="管理费用"> <input type="text"
			name="budget/invest_detail/invest[14]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_14"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='14']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[14]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='14']/user_desc" />"/></td>
	</tr>
	<tr>
		<td align="left" >12、其他费用</td>
		<td><input type="hidden"
			name="budget/invest_detail/invest[15]@invest_code" value="15">
			<input type="hidden" name="budget/invest_detail/invest[15]/name"
			value="其他费用"> <input type="text"
			name="budget/invest_detail/invest[15]/total_total" 
			style="text-align: right; width: 100px;" id="total_total_15"
			onfocus="InitInput.setNumber(this,9,4,2)"
			onchange="countFundAuto('total_','total_1,total_13,total_14,total_15,total_5,total_6,total_7,total_8,total_9,total_10,total_11,total_12','total_0');"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='15']/total_total" />" />
		</td>
		
		<td><input type="text" style="width: 90%" name="budget/invest_detail/invest[15]/user_desc"  maxlength="200"
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='15']/user_desc" />"/></td>
	</tr>
</table>

<br/>
<div class="t_bar">附表1：设备清单明细表</div>
<table  id="tblEuipmentLists" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
			<thead >
					<tr style="border:1px solid #B7D1E6">
						<th class="TblHead" align="center"  width="4%">选择</th>
						<th class="TblHead" align="center"  width="4%">序号</th>
						<th class="TblHead" align="center"  width="9%">设备名称</th> 
						<th class="TblHead" align="center"  width="8%">购置/试制</th> 
				        <th class="TblHead" align="center"  width="7%">设备单价<br/>（万元/台件）</th> 
						<th class="TblHead" align="center"  width="7%">数量<br/>（台件）</th>
						<th class="TblHead" align="center"  width="7%">总价<br/>（万元）</th>
						<th class="TblHead" align="center"  width="8%">设备型号</th>  
						<th class="TblHead" align="center"  width="10%">设备生产国<br/>别与地区</th>
						<th class="TblHead" align="center"  width="8%">发票号码</th>   
						<th class="TblHead" align="center"  width="12%">日期</th>   
						<th class="TblHead" align="center"  width="8%">用途</th>   
						<th class="TblHead" align="center"  width="8%">备注</th>           
					</tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none" align="center">
						<td align="center">&nbsp;
							<input type="radio" class="radiobutton" name="selEuipmentLists" >
						</td>
						<td align="center">&nbsp;
							<span name="euipments|list[0]@seq_no" >[index]</span> 
						</td>
						<td>
							<input type="text" name="euipments|list[0]|name" label="设备名称" class=" required input_text " maxlength="50" style="width:80%"/>
						</td>
						<td style="text-align: center;">
				        <cpt:select id="purchase[index]" key="euipments"  name="purchase" onChange="initControlValue(this.id);countjsTable2('tblEuipmentLists');" style="width:80%"></cpt:select>
		                <input type="hidden" name="euipments|list[0]|purchase_value" class="required" label="购置/试制" value=""/>
		                <input type="hidden" name="euipments|list[0]|purchase_name" value=""/>
			            </td>
						<td>
							<input type="text" name="euipments|list[0]|price"  onchange="countjsTotal(this);countjsTable2('tblEuipmentLists');" label="单价" onfocus="InitInput.setNumber(this,7,4,2)"   style="text-align:right;width:80%" class=" input_text required" />
						</td> 
						<td>
							<input type="text" name="euipments|list[0]|amount"  onchange="countjsTotal(this);countjsTable2('tblEuipmentLists');" label="数量" onfocus="InitInput.setNumber(this,7,0,0)" style="text-align:right;width:80%" class=" input_text required" />
						</td>
						<td>
							<input type="text" name="euipments|list[0]|money" disabled label="总价"  onfocus="InitInput.setNumber(this,7,4,2)" style="text-align:right;width:80%" class=" input_text required gray" />
						</td> 
						<td>
							<input type="text" name="euipments|list[0]|model" label="型号" class=" input_text required" maxlength="50" style="width:80%"/>
						</td>
						<td>
							<input type="text" name="euipments|list[0]|country_name" label="生产国别" class=" input_text required" maxlength="50" style="width:80%"/>
						</td>
						<td>
							<input type="text" name="euipments|list[0]|invoice_number" label="发票号码" class=" input_text required" maxlength="50" style="width:80%"/>
						</td>
						<td align="center" nowrap><input  id="list_start_date_[0]" name="euipments|list[0]|start_date" label="日期" value="" class=" required input_text date " style="width:65px" /></td>
                         <td>
							<input type="text" name="euipments|list[0]|user_desc" label="用途"  class=" input_text required" maxlength="100" style="width:80%"/>
						</td> 
						<td>
							<input type="text" name="euipments|list[0]|remark" label="备注"  class=" input_text required" maxlength="100" style="width:80%"/>
						</td> 
					</tr>
					
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/euipments/list" var="list">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr align="center">
						<td align="center">&nbsp;
							<input type="radio" class="radiobutton" name="selEuipmentLists" >
						</td>
						<td align="center">&nbsp;
							<span name="euipments/list[${flag}${index}]@seq_no" ><x:out select="$list/@seq_no"/></span> 
						</td>
						<td>
							<input type="text" name="euipments/list[${flag}${index}]/name"  label="设备名称" style="width:80%"   class=" input_text required" value="<x:out select="$list/name" />" maxlength="50"/>
						</td>
						<td style="text-align: center;">
						<c:set var="purchase_value"><x:out select="$list/purchase_value" /></c:set>
						<cpt:select id="purchase${index}" key="euipments" name="purchase"  value="${purchase_value }" onChange="initControlValue(this.id);countjsTable2('tblEuipmentLists');" style="width:80%"></cpt:select>
			            <input type="hidden" name="euipments/list[${flag}${index}]/purchase_value" class="required" label="购置/试制" value="<x:out select="$list/purchase_value" />"/>
			            <input type="hidden" name="euipments/list[${flag}${index}]/purchase_name" value="<x:out select="$list/purchase_name" />"/>
				        </td>
						<td >
							<input type="text" name="euipments/list[${flag}${index}]/price" onchange="countjsTotal(this);countjsTable2('tblEuipmentLists');" label="单价"  onfocus="InitInput.setNumber(this,7,4,2)"   style="text-align:right;width:80%"  class=" input_text required" value="<x:out select="$list/price" />"/>
						</td> 
						<td >
							<input type="text" name="euipments/list[${flag}${index}]/amount" onchange="countjsTotal(this);countjsTable2('tblEuipmentLists');" label="数量"  onfocus="InitInput.setNumber(this,7,0,0)"   style="text-align:right;width:80%"  class=" input_text required" value="<x:out select="$list/amount" />"/>
						</td>
						<td >
							<input type="text" name="euipments/list[${flag}${index}]/money"  label="总价" onfocus="InitInput.setNumber(this,7,4,2)" disabled  style="text-align:right;width:80%"  class=" input_text required gray" value="<x:out select="$list/money" />"/>
						</td> 
						
						<td>
							<input type="text" name="euipments/list[${flag}${index}]/model"  label="型号" style="width:80%"   class=" input_text required" value="<x:out select="$list/model" />" maxlength="50"/>
						</td>
						<td>
							<input type="text" name="euipments/list[${flag}${index}]/country_name"  label="生产国别" style="width:80%"   class=" input_text required" value="<x:out select="$list/country_name" />" maxlength="50"/>
						</td>
						<td>
							<input type="text" name="euipments/list[${flag}${index}]/invoice_number" label="发票号码"  style="width:80%"   class=" input_text required" value="<x:out select="$list/invoice_number" />" maxlength="50"/>
						</td>
						<td align="center" nowrap><c:set var="start_date" scope="page"><x:out select="$list/start_date"/></c:set>
							<input  id="list_start_date_[${flag}${index}]" value="${start_date}" name="euipments/list[${flag}${index}]/start_date" class="required date input_text" style="width:65px" label="日期" /> 
						</td>
						<td>
							<input type="text" name="euipments/list[${flag}${index}]/user_desc"  label="用途"  style="width:80%"   class=" input_text required" value="<x:out select="$list/user_desc" />" maxlength="50"/>
						</td> 
						<td>
							<input type="text" name="euipments/list[${flag}${index}]/remark"  label="备注"  style="width:80%"   class=" input_text required" value="<x:out select="$list/remark" />" maxlength="50"/>
						</td> 
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
					<script type="text/javascript">
						showAllDateTag("tblEuipmentLists");
					</script>
				</tbody>
					</table>
					<table   cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
					<tr align="center">
					<td colspan="3" width="17%">单价5万元以上的购置设备合计</td>
					<td width="8%">/</td>
					<td width="7%">/</td>
					<td width="7%"><input name="euipments_list/amount" id="list_amount_1" value="<x:out select="$xmlData/data/euipments_list/amount" />" class="gray input_text" style="width:80%"  disabled  onfocus="InitInput.setNumber(this,7,4,2)" /></td>
					<td width="7%"><input name="euipments_list/money" id="list_money_1" value="<x:out select="$xmlData/data/euipments_list/money" />" class="gray input_text"  style="width:80%" disabled  onfocus="InitInput.setNumber(this,7,4,2)" /></td>
					<td width="8%">/</td>
					<td width="10%">/</td>
					<td width="8%">/</td>
					<td width="12%">/</td>
					<td width="8%">/</td>
					<td width="8%"><input name="euipments_list/remark1" id="remark1" value="<x:out select="$xmlData/data/euipments_list/remark1" />" class=" input_text required" label="单价5万元以上的购置设备合计备注" style="width:80%" /></td>
					</tr>
					<tr align="center">
					<td colspan="3">单价5万元以上的试制设备合计</td>
					<td>/</td>
					<td>/</td>
					<td><input name="euipments_list/amount2" id="list_amount_2" value="<x:out select="$xmlData/data/euipments_list/amount2" />" class="gray input_text"  disabled style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)" /></td>
					<td><input name="euipments_list/money2" id="list_money_2" value="<x:out select="$xmlData/data/euipments_list/money2" />" class="gray input_text"  disabled  style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)" /></td>
					<td>/</td>
					<td>/</td>
					<td>/</td>
					<td>/</td>
					<td>/</td>
					<td><input name="euipments_list/remark2" id="remark2" value="<x:out select="$xmlData/data/euipments_list/remark2" />" class=" input_text required" label="单价5万元以上的试制设备备注" style="width:80%" /></td>
					</tr>
					<tr align="center">
					<td colspan="3">单价5万元以下的购置设备</td>
					<td>/</td>
					<td>/</td>
					<td><input name="euipments_list/amount3" id="list_amount_3" value="<x:out select="$xmlData/data/euipments_list/amount3" />" class="gray input_text"  disabled style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)" /></td>
					<td><input name="euipments_list/money3" id="list_money_3" value="<x:out select="$xmlData/data/euipments_list/money3" />" class="gray input_text"  disabled  style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)" /></td>
					<td>/</td>
					<td>/</td>
					<td>/</td>
					<td>/</td>
					<td>/</td>
					<td><input name="euipments_list/remark3" id="remark3" value="<x:out select="$xmlData/data/euipments_list/remark3" />" class=" input_text required" label="单价5万元以下的购置设备备注" style="width:80%" /></td>
					</tr>
					<tr align="center">
					<td colspan="3">单价5万元以下的试制设备</td>
					<td>/</td>
					<td>/</td>
					<td><input name="euipments_list/amount4" id="list_amount_4" value="<x:out select="$xmlData/data/euipments_list/amount4" />" class="gray input_text"  disabled style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)" /></td>
					<td><input name="euipments_list/money4" id="list_money_4" value="<x:out select="$xmlData/data/euipments_list/money4" />" class="gray input_text"  disabled  style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)" /></td>
					<td>/</td>
					<td>/</td>
					<td>/</td>
					<td>/</td>
					<td>/</td>
					<td><input name="euipments_list/remark4" id="remark4" value="<x:out select="$xmlData/data/euipments_list/remark4" />" class=" input_text required" label="单价5万元以下的试制设备备注" style="width:80%" /></td>
					</tr>
					<tr align="center">
					<td colspan="3">合     计</td>
					<td>/</td>
					<td>/</td>
					<td><input name="euipments_list/amount5" id="list_amount_5" value="<x:out select="$xmlData/data/euipments_list/amount5" />" class="gray input_text"  disabled style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)" /></td>
					<td><input name="euipments_list/money5" id="list_money_5" value="<x:out select="$xmlData/data/euipments_list/money5" />" class="gray input_text"  disabled  style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)" /></td>
					<td>/</td>
					<td>/</td>
					<td>/</td>
					<td>/</td>
					<td>/</td>
					<td><input name="euipments_list/remark5" id="remark5" value="<x:out select="$xmlData/data/euipments_list/remark5" />" class=" input_text required" label="设备清单明细表备注" style="width:80%" /></td>
					</tr>
					</table>
					
					<table width="98%" align="center" border="0">
					<tr style="border: 0"><td style="border: 0">
					<input class="button" name="cmdAddbefore" type=button value="添加" onclick="addNewRow('tblEuipmentLists');showDateTag('tblEuipmentLists');try{top.resizeFrame();}catch(e){};">
					<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tblEuipmentLists','selEuipmentLists')">
					<input class="button" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tblEuipmentLists','selEuipmentLists')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tblEuipmentLists','附表1：设备清单明细表');countjsTable2('tblEuipmentLists');">
					</td></tr>
	</table>	
	<div>
	<p>填表说明：1、购置、试制设备单价≥5万元的设备需在本表填写明细；2、试制设备不需填设备型号、设备生存国别与地区。 </p>
	</div>



<script type="text/javascript">
$(document).ready(function() {
var prp_version=$("#prp_version").text();

if(prp_version==""||prp_version==null){
	$("#budgetsMsg").find(":input").each(function(){
	$(this).val("0.00");	
	});
	
	$("#budgetsMsg1").find(":input").each(function(){
		$(this).val("0.00");	
		});
	
	 $("#fundAdds").find(":input[type!=hidden]").each(function(){
		/* $(this).val("0.00");	 */
		$("input[id^='total_total_']").val("0.00");	
		});
}


	//$("#source_city").attr("disabled",true);
	//$("#source_area").attr("disabled",true);
	//$("#source_city").addClass("gray");
	//$("#source_area").addClass("gray");

	countjsTableOther("tblEuipmentLists");
});

function synchro(){
	var source_apply = $("#source_apply").val();
	var source_total = $("#source_total").val();
	var source_already = $("#source_already").val();
	$("#sqje").val(formatVal2(source_apply));
	$("#investment_budget").val(formatVal2(source_total));
	$("#finsh_budget").val(formatVal2(source_already));
	  
	
}

function countjsTotal(obj) {
	
	var price = $(obj).parent().parent().find("[name$='price']").val();
	var amount = $(obj).parent().parent().find("[name$='amount']").val();
	
	if (!$.isNumeric(price) || !$.isNumeric(amount) ) {
		$(obj).parent().parent().find("[name$='money']").val("");
	} else {
		var count = Math.round(parseFloat(price)*10000 * parseInt(amount,10))/10000;
		count = formatNumberAuto(count.toString(), 9, 4, 2);// 格式化金额
		$(obj).parent().parent().find("[name$='money']").val(count);
	}
	
}

function countjsTable2(tblId){
	  
	   var count2=0;
	   var count3=0;
	   var count4=0;
	   var count5=0;
	   var count6=0;
	   var count7=0;
	   var count8=0;
	   var count9=0;
	   var count10=0;
	   var count11=0;
	   $("#"+tblId+" tr:gt(1)").each(function() {
		   var fund = $(this).children().eq("3").children().val();
		   var fund2 = $(this).children().eq("4").children().val();
		   var fund3 = $(this).children().eq("5").children().val();
		   var fund4 = $(this).children().eq("6").children().val();
		   
		   if (!$.isNumeric(fund))  fund = "0";
		   if (!$.isNumeric(fund2)) fund2 = "0";
		   if (!$.isNumeric(fund3)) fund3 = "0";
		   if (!$.isNumeric(fund4)) fund4 = "0";
		   if(fund==2){
			   $(this).children().eq("7").children().removeClass("required");
			   $(this).children().eq("8").children().removeClass("required");
		   }else{
			   $(this).children().eq("7").children().addClass("required");
			   $(this).children().eq("8").children().addClass("required");
		   }
		  
		   if(parseFloat(fund2)>parseFloat(5)){
			   if(fund==1){
				   count2=parseInt(fund3)+parseInt(count2);
				   count3 = ((parseFloat(count3)*10000 + parseFloat(fund4)*10000)/10000).toFixed(4);
			   }
			   if(fund == 2){
				   count4 = parseInt(fund3)+parseInt(count4);
				   count5 = ((parseFloat(count5)*10000 + parseFloat(fund4)*10000)/10000).toFixed(4);
			   }
			   
			   
		   }else{
			   if(fund==1){
				   count6=parseInt(fund3)+parseInt(count6);
				   count7 = ((parseFloat(fund4)*10000 + parseFloat(count7)*10000)/10000).toFixed(4);
			   }
			   if(fund == 2){
				   count8 = parseInt(fund3)+parseInt(count8);
				   count9 = ((parseFloat(fund4)*10000 + parseFloat(count9)*10000)/10000).toFixed(4);
			   }
		   }
		   
		   
			
    });
	   
	   count10 = parseInt(count2) + parseInt(count4) + parseInt(count6) + parseInt(count8);
	   count11 = ((parseFloat(count3)*10000 + parseFloat(count5)*10000 + parseFloat(count7)*10000 + parseFloat(count9)*10000)/10000).toFixed(4); 
	   
	   count2 = formatNumberAuto(count2.toString(), 9, 0, 0);// 格式化金额
	   count3 = formatNumberAuto(count3.toString(), 9, 4, 2);// 格式化金额
	   count4 = formatNumberAuto(count4.toString(), 9, 0, 0);// 格式化金额
	   count5 = formatNumberAuto(count5.toString(), 9, 4, 2);// 格式化金额
	   count6 = formatNumberAuto(count6.toString(), 9, 0, 0);// 格式化金额
	   count7 = formatNumberAuto(count7.toString(), 9, 4, 2);// 格式化金额
	   count8 = formatNumberAuto(count8.toString(), 9, 0, 0);// 格式化金额
	   count9 = formatNumberAuto(count9.toString(), 9, 4, 2);// 格式化金额
	   count10 = formatNumberAuto(count10.toString(), 9, 0, 0);// 格式化金额
	   count11 = formatNumberAuto(count11.toString(), 9, 4, 2);// 格式化金额
	  
       if(tblId=="tblEuipmentLists"){
    	  $("#list_amount_1").val(count2); 
 		  $("#list_money_1").val(count3); 
 		  $("#list_amount_2").val(count4);
 		  $("#list_money_2").val(count5);  
 		  $("#list_amount_3").val(count6);
		  $("#list_money_3").val(count7);  
		  $("#list_amount_4").val(count8);
 		  $("#list_money_4").val(count9);  
 		  $("#list_amount_5").val(count10);
		  $("#list_money_5").val(count11);  
	   }
}

function countjsTableOther(tblId){
	  
	   $("#"+tblId+" tr:gt(1)").each(function() {
		   var fund = $(this).children().eq("3").find("input[name$='purchase_value']").val();
		   if(fund==2){
			   $(this).children().eq("7").children().removeClass("required");
			   $(this).children().eq("8").children().removeClass("required");
		   }else{
			   $(this).children().eq("7").children().addClass("required");
			   $(this).children().eq("8").children().addClass("required");
		   }
 });
	   
}


</script>
